package com.example.a_java.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.a_java.entity.LoanApply;
import com.example.a_java.mapper.LoanApplyMapper;
import com.example.a_java.service.LoanApplyService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 贷款申请Service实现�?
 */
@Service
public class LoanApplyServiceImpl extends ServiceImpl<LoanApplyMapper, LoanApply> implements LoanApplyService {
    private final LoanApplyMapper loanApplyMapper;

    public LoanApplyServiceImpl(LoanApplyMapper loanApplyMapper) {
        this.loanApplyMapper = loanApplyMapper;
    }

    @Override
    public List<LoanApply> findAllByIsDeletedFalse() {
        QueryWrapper<LoanApply> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("is_deleted", false);
        return loanApplyMapper.selectList(queryWrapper);
    }
}
